
import React, { Component, PropTypes } from 'react';
import { Button } from 'antd';
import dva, { connect } from 'dva';
import { Link } from 'dva/router';


class Login extends Component {

  static contextProps = {

    router: PropTypes.object,
  }

  render() {

    console.log('login props', this.props)

    return (
      <div>
        <Link to="/list">List</Link>
      </div>
    );
  }
}


// 监听属性，建立组件和数据的映射关系
function mapStateToProps(state) {
  return {state};
}


// 关联 model
export default connect(mapStateToProps)(Login);
